-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial gRPC CLI #41249
Initial gRPC CLI #41249
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me.
It's not clear to me why CI barfs. |
@gsmet any idea? ^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to verify if it can be built from scratch.
Also, Some tests would be useful.
import picocli.CommandLine.Spec; | ||
|
||
@TopCommand | ||
@Command(name = "grpc", sortOptions = false, header = "grpc CLI", subcommands = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why CLI in the header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just dropping the CLI?
@Spec | ||
protected CommandSpec spec; | ||
|
||
@CommandLine.Option(names = { "-h", "--help" }, usageHelp = true, description = "Display this help message.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this generated by picocli automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, no idea -- copied this from one of the existing CLI commands ...
@iocanel ^ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iocanel can this be dropped? ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it can be possibly dropped.
quarkus.log.level=INFO | ||
quarkus.banner.enabled=false | ||
quarkus.package.jar.type=uber-jar | ||
quarkus.package.jar.add-runner-suffix=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work I believe.
When building Quarkus from scratch, you won't find the plugin, because the plugin is built.
In another case, I had to switch to the assembly maven plugin (would love to switch back to the Quarkus plugin).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yeah, this could be a problem ... since my copied example was from Quarkiverse, hence made it more easy.
Any ideas / suggestions what can be done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :-) I'm going to push a PR today that does this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we do uberjar here? why not just reuse users most likely already downloaded deps for this cli?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxandersen seems like Uber-jar is the way to distribute self-contained commands. At least that's what I got from the doc and when I tried the "fast-jar" approach, it did not work (and anyway, fast jar would need quarkus before quarkus)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah okey - if the actual cli is a quarkus app and not "just" a java app you need it. It would be interesting if we had a way to make a jar that has only the classes that need changing and rest could just be fetched using dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm - even uber-jar would need quarkus before quarkus would it not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Quarkus for these commands works, but yes it might be overkill.
By using the assembly plugin it works because it waits for all dependencies to be built before building that fat jar. Having a plugin dependency is slightly more complicated and fail in all my attempts from scratch. Funny, I had the same issue more than 10 years ago where I had to have profiles to build the plugin and then the modules using the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to build the Maven plugin right after core-deployment to make it available for other extensions.
Scratch? Wdym?
Yeah ... is there some existing example of it? |
Look at #41418 |
@cescoffier OK, added assembly + test(s) |
This comment has been minimized.
This comment has been minimized.
308ed60
to
c213eb8
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e95969f
to
21acd4f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I don't know how we can end up with duplicates in the JSON descriptor but let's make sure it doesn't affect our build.
It is not an extension so it should not depend on extensions.
Status for workflow
|
Status for workflow
|
I think the comments were addressed. I will merge it to 3.14 and we can improve on it later.
I think we will need to take a big step back as to what is an extension or not in the gRPC stuff as we had numerous issues with that and, while we were able to work around them, some are still around. I will merge it for 3.14 as I think it's an interesting addition and we can improve on it. |
🙈 The PR is closed and the preview is expired. |
Simple gcurl-like CLI -- currently supporting gRPC list, describe and invoke.